package com.tech.connect.model;

import java.util.List;
import java.util.Objects;

public class CatOpt {
    public String id;
    public String name;
    public String type;
    public String parentId;
    public String valid;
    public List<CatOpt> childs;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CatOpt catOpt = (CatOpt) o;
        return Objects.equals(id, catOpt.id);
    }

    @Override
    public String toString() {
        return "CatOpt{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", parentId='" + parentId + '\'' +
                ", valid=" + valid +
                ", childs=" + childs +
                '}';
    }

    @Override
    public int hashCode() {

        return Objects.hash(id);
    }
}
